#pragma once

#include"HiKernel/HiModule.h"


class HI_DLLEXPORT mHiCharacter : public HiModule
{
private:
	struct sCharacter
	{
		std::string CharacterFileName;

	};

	std::vector<sCharacter*> m_vCharacterName;

protected:

	D3DXVECTOR3			m_vTrans;
	HiSFVec3f			*m_vVec3f;

	D3DXVECTOR3			m_vTranskNormal;
	HiSFVec3f			*m_vVec3fkNormal;

public:

	float m_fMoveSlide;

	bool m_bFirstInit;

	float m_fCharacterZPoint;
	float m_fPrevZPoint;

	float m_fkgravity;
	float m_fGravitySpeed;

	NiPoint3 m_kPos;

	NiNodePtr m_pkEffect;
	NiNodePtr m_pkNode;

	float m_fRotationIncrement;

	enum eCharacter_Animation
	{
		MSG_RUN              ,
		MSG_WAIT             ,
		MSG_WALK
	};

	void			Realize();

	mHiCharacter(HiXmlNode*xml=NULL);                                   
	virtual ~mHiCharacter() {}          

	void PostConfig();
	void Update();     
	void Render();    

	bool HandleMessage(const Telegram& msg);

	int ParseXml(HiXmlNode*xml);// {return 1;};
	int SetXmlAttrs(HiXmlNode*xml)                  { return 1; }

};